import request, { requestOld } from '@/utils/request'
import { batchTask } from '../deviceMonitor/work'

// 查询用电量列表
export function listHteq(query) {
  return request({
    url: '/param/eq/list',
    method: 'get',
    params: query
  })
}

// 设置电量参数
export function eqSet(params) {
  return request({
    url: '/param/eq/set',
    method: 'get',
    params
  })
}

// 电量参数召测
export function eqCall(query) {
  return batchTask({
    newUrl: '/param/eq/call',
    oldUrl: '/ChaobiaoModule/Tparam_eq/GetCheckData',
    meterNos: query.meterNos,
    rooms: query.rooms,
    updateUrl: '/old/refresh/param/eq',
    onItemOver: query.onItemOver
  })
}

// 电量参数删除
export function eqDel(params) {
  return request({
    url: '/param/eq/del',
    method: 'get',
    params
  })
}